﻿using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WebApp.Entities
{
    /// <summary>
    /// 对应应用
    /// </summary>
    [Table("application")]
    public class Application
    {
        /// <summary>
        /// 
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 所属用户
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string AppName { get; set; }
        /// <summary>
        /// 接口签名Token
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string AppToken { get; set; }
        //public string CallbackUrl { get; internal set; }
        /// <summary>
        /// 订阅回调
        /// </summary>
        [ForeignKey("AppId")]
        public virtual ICollection<Subscribe> Subscribes { get; set; }
    }
}